#include "base/distributed_counter.h"

int main() {
  LOG_INIT("./distributed_counter_test.log", "DEBUG");

  using namespace std;
  base::DistributedCounter c("/test");
  // c.Reset();

  for(int i = 0; i < 100000000; ++i) {
    int64_t v = c.GetAndInc(1);
    // if (v <= 0 || v % 1000 == 0) {
      cout << v << endl;
      // usleep(10);
    // }
  }
  cout << c.GetAndInc(0) << endl;
   
  return 0;
}

